Macro Manager dialog

Use the Macro Manager dialog to manager to import and edit macro definitions for a model. It is opened from the Macro Manager menu item on the Model Menu. For more information about defining and using macros see Working with Macros.

 

Use the to add a new macro to the model. The added macro will be empty. Click on to define it.

Name

Lists the names of user defined macros. Names must be globally unique, and can be changed by editing the macro definition.

Edit

Lets you make changes to the macro definition. This will open the macro definition up the same way that a module is opened, and allow you to make changes to it by editing equations, and by using the Macro Settings Tab of the properties panel.

You can only edit macros that has diagram information associated with them, and all macros created in Stella will have diagram information. It is also possible to create or import macros from other sources, and these may not have any diagram information. It is not possible to edit or rename such macros.

Copy

Will make a copy of the macro and add it to the list of macros. It will be named MacroName 1 (or 2, 3... as needed for uniqueness). You can edit it to make changes. This is convenient way to build a variation of an existing macro, and to experiment with alternative formulations.

Export

Click on this to save the macro definition to a file. The created will be an empty model with only the macro definition in it. If the macro you are exporting uses another macro, that macro will also be included in the file (as will any macro used by that secondary macro and so on).

Delete

This will remove the macro from the model. Any variables that use the macro will then have errors. Similarly, and other macros that use the deleted macro will have errors.

Import

Use import to bring macro definitions from one model into your current model. After clicking on the button select a model to bring the definitions from. Only the macros, none of the model content, will be used.

If a macro name in the model you specify already exists as a macro in the model you are working on, and that macro is different, you will be asked if you want to overwrite your existing macro definition.

If a macro name in the model you specify is already used by a variable in the model you are working on, you will receive a message that the macro could not be sued.